package com.xctech.ipb.dpn.common.exception;

public enum AuthErrorCode implements ErrorCode {

    // 用户不存在, 未登录, 登录过期, 登录失效, 登录异常, 无权限
    USER_NOT_EXIST(2001, "用户不存在"),
    USER_NOT_LOGIN(2002, "用户未登录"),
    USER_LOGIN_EXPIRED(2003, "用户登录过期"),
    USER_LOGIN_INVALID(2004, "用户登录失效"),
    USER_LOGIN_ERROR(2005, "用户登录异常"),
    USER_NO_PERMISSION(2006, "用户无权限"),
    USER_LOGIN_FAILED(2007, "用户登录失败");


    private Integer code;

    private String message;

    AuthErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
